<?php
/**
 * Created by PhpStorm.
 * User: u
 * Date: 2019/4/1
 * Time: 17:18
 */

namespace common\sources\write\taskcommodlog;

use Yii;

class TaskCommodLogAccess implements ITaskCommodLogAccess
{
    public function addTaskCommodLog($param)
    {
        $res = Yii::$app->db->createCommand()->insert('business_task_commod_log', [
            'bus_id' => $param['bus_id'],
            'task_status' => $param['task_status'],
            'status_remark' => isset($param['status_remark']) ? $param['status_remark'] : '',
            'remark' => isset($param['remark']) ? $param['remark'] : '',
            'operator' => isset($param['operator']) ? $param['operator'] : '',
            'task_id' => $param['task_id'],
            'create_time' => time()
        ])->execute();
        return $res;
    }
}